package com.baidumap.administrator.happystudy.ui;

import android.content.Context;
import android.net.Uri;
import android.view.View;

import com.baidumap.administrator.happystudy.R;
import com.baidumap.administrator.happystudy.base.AppBaseActivity;
import com.facebook.drawee.backends.pipeline.Fresco;
import com.facebook.drawee.interfaces.DraweeController;
import com.facebook.drawee.view.SimpleDraweeView;

/**
 * 描述：关于
 * 作者：xiaoxing on 17/4/10 22:14
 * 邮箱：2235445233@qq.com
 */
public class AboutActivity extends AppBaseActivity {
    private SimpleDraweeView dvWelcome;
    DraweeController draweeController;
    @Override
    public int bindLayout() {
        return R.layout.activity_about;
    }

    @Override
    public void initView(View view) {
        super.initView(view);
        Fresco.initialize(this);
        /**
         * 下面是主要代码：
         */ 
        draweeController = Fresco.newDraweeControllerBuilder()
                .setAutoPlayAnimations(true)//自动播放动画
//                .setUri(Uri.parse("http://s1.dwstatic.com/group1/M00/9B/31/468f0fc71e49479bf021c64cefee2882.gif"))//路径
                .setUri(Uri.parse("asset://com.baidumap.administrator.happystudy/about_bottom1.gif"))//路径
                .build();

        dvWelcome = (SimpleDraweeView) view.findViewById(R.id.dv_welcome);
        dvWelcome.setController(draweeController);
    }

    @Override
    public void doBusiness(Context mContext) {
        super.doBusiness(mContext);
        setHeaderBack();
        setHeaderTitle(R.string.about);
    }
}
